FILE(GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
FILE(GLOB_RECURSE HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h)


# set include and lib dirs
IF (WIN32)
    # setup for windows
    SET(GLFW3_INCLUDE_DIR "D:/Libs/glfw/include/")
    SET(GLFW3_LIBRARY "D:/Libs/glfw/lib/glfw3.lib")
    SET(GLEW_INCLUDE_DIR "D:/Libs/glew/include/")
    SET(GLEW_LIBRARY "D:/Libs/glew/lib/glew32.lib")  
    SET(GLM_INCLUDE_DIR "D:/Libs/glm/include/")
    SET(ASSIMP_INCLUDE_DIR "D:/Libs/assimp/include")
    SET(ASSIMP_LIBRARY "D:/Libs/assimp/lib/Debug/assimp-vc142-mtd.lib")
    if(MSVC)
        add_definitions(-D_CRT_SECURE_NO_WARNINGS)
    endif()

ELSE (WIN32)
    # setup for mac/linux
    SET(GLFW3_INCLUDE_DIR "/usr/local/include")
    SET(GLFW3_LIBRARY "/usr/local/lib/libglfw.dylib")
    SET(GLEW_INCLUDE_DIR "/usr/local/include")
    SET(GLEW_LIBRARY "/usr/local/lib/libGLEW.dylib")
    SET(GLM_INCLUDE_DIR "/usr/local/include")

ENDIF (WIN32)


add_executable(
    example3d
    ${SOURCE_FILES}
    ${HEADER_FILES}
)

target_include_directories(
    example3d PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/../../src/
    
    ${GLFW3_INCLUDE_DIR}
    ${GLEW_INCLUDE_DIR}
    ${GLM_INCLUDE_DIR}
    ${ASSIMP_INCLUDE_DIR}
)

target_link_libraries(
    example3d PRIVATE 
    teflon
    ${GLFW3_LIBRARY}
    ${GLEW_LIBRARY}
    ${OPENGL_LIBRARIES}
    ${ASSIMP_LIBRARY}
)
